package com.backweb.service.Impl;

import com.backweb.dao.ArticleDao;
import com.backweb.model.Article;
import com.backweb.service.IArticle;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class IArticleImpl implements IArticle {

    @Autowired
    private ArticleDao rticleDao;


    @Override
    public Article findArticleByRid(int rid) {
        return rticleDao.findArticleByRid(rid);
    }

    @Override
    public List<Article> findPage(String t1, String t2, Integer pageNo, Integer rows) {
        return rticleDao.findPage(t1,t2,pageNo,rows);
    }

    @Override
    public Integer findPageTotal(String t1, String t2) {
        return rticleDao.findPageTotal(t1,t2);
    }

    @Override
    public void delete(Article entity) {
        rticleDao.delete(entity);
    }

    @Override
    public int dayTotal(int type) {
        return rticleDao.dayTotal(type);
    }

    @Override
    public List<Article> dayPage(int type, Integer pageNo, Integer rows) {
        return rticleDao.dayPage(type,pageNo,rows);
    }
}
